<?php
class AdminScheduleForm extends sfForm
{
	public function configure()
    {
		$this->setWidgets(array(
                'ground_id'               	=> new sfWidgetFormInput(),
                'schedule'                	=> new sfWidgetFormInput(),
				'cost'                		=> new sfWidgetFormInput(),
				'cost_weekend'         		=> new sfWidgetFormInput(),
				'promotion'            		=> new sfWidgetFormInput()
				));
		$this->setValidators(array(
	            'ground_id'               	=>  new sfValidatorString(array('required' => false)),
	            'schedule'                	=>  new sfValidatorString(array('required' => false)),
				'cost'                		=>  new sfValidatorInteger(array('required' => false)),
				'cost_weekend'         		=>  new sfValidatorInteger(array('required' => false)),
				'promotion'            		=>  new sfValidatorInteger(array('required' => false))
		));
        $this->widgetSchema->setNameFormat('schedule[%s]');
		$this->widgetSchema->setLabels(array(
				'ground_id'					=> 'Mã số sân',
				'schedule'					=> 'Giờ',
				'cost'						=> 'Giá',
				'cost_weekend'				=> 'Giá cuối tuần',
				'promotion'					=> 'Khuyến mãi',
		));
	}
}
?>